<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
	"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
	"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping >
  <class name="cn.firstsoft.modules.portal.domain.UserPage" table="user_page" 
  	dynamic-insert="true" dynamic-update="true">
  		<id name="id" type="integer">
            <column name="id" />
            <generator class="native">
            	<param name="sequence">USERPAGE_ID_SEQ</param>
            </generator>
        </id>
        <property name="pos" type="integer">
            <column name="pos" not-null="true"/>
        </property>
        <property name="isDefault" type="integer">
            <column name="isDefault" />
        </property>
        <many-to-one name="module" class="org.springside.modules.security.domain.Module" fetch="select">
            <column name="module_id"  />
        </many-to-one>
        <many-to-one name="page" class="cn.firstsoft.modules.portal.domain.Page" fetch="select">
            <column name="page_id"  />
        </many-to-one>
        <many-to-one name="user" class="org.springside.modules.security.domain.User" fetch="select">
            <column name="user_id" />
        </many-to-one>
  </class>
</hibernate-mapping>